<template>
  <div>
    <van-nav-bar title="马甲支付" left-text="返回" left-arrow></van-nav-bar>
    <van-button @click="pay" size="large" type="danger" style="position: fixed;bottom: 0;">支付</van-button>
  </div>
</template>
<script>
  import axios from "axios"
  import url from "../assets/app/url"
  import Magappx from "../assets/app/platform/Magappx"

  export default {
    data: function () {
      return {
        order: {}
      };
    },
    created: function () {
      axios.get(url.OrderInfo + "OrderId/" + this.$route.query.id).then(req => {
        this.order = req.data.info;
      })
    },
    methods: {
      pay: function () {
        Magappx.pay(this.order.realprice, this.order.orderid
          , this.order.orderid, this.order.unionordernum);
      }
    }
  }
</script>
<style>

</style>
